package db

import (
	"github.com/lishimeng/app-starter"
)

type AmazonLwaCommon struct {
	ClientId string `orm:"column(client_id)"`
	Name     string `orm:"column(name;null)"`
	Owner    string `orm:"column(owner;null)"`
}

type AmazonLwa struct {
	app.Pk
	AmazonLwaCommon
	Secret string `orm:"column(secret;null)"`
	app.TableChangeInfo
}

func (t *AmazonLwa) TableName() string {
	return "amazon_lwa"
}

type AmazonAdsProfile struct {
	app.Pk
	ClientId    string `orm:"column(client_id)"`
	ProfileId   int64  `orm:"column(profile_id)"`
	CountryCode string `orm:"column(country_code)"`
	app.TableInfo
}

func (t *AmazonAdsProfile) TableName() string {
	return "amazon_ads_profile"
}

type AmazonToken struct {
	app.Pk
	ClientId     string `orm:"column(client_id)"`
	AccessToken  string `orm:"column(access_token)"`
	RefreshToken string `orm:"column(refresh_token)"`
	ApplyAt      int64  `orm:"column(apply_at)"`
	Expires      int    `orm:"column(expires)"`
	app.TableChangeInfo
}

func (t *AmazonToken) TableName() string {
	return "amazon_token"
}
